package com.aeye.mbr.upms.dao.model;


import com.aeye.mbr.upms.common.constant.SmsDatabaseConstants;
import com.gitee.sunchenbin.mybatis.actable.annotation.DBColumn;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by chengshengru on 17-7-5.
 */
@Table(name = SmsDatabaseConstants.TABLE_SMS_CONFIG)
public class SmsConfig implements Serializable {



    public static final int ENABLE = 0;

    private static final int DISABLED = 1;

    /**
     * 微米
     */
    public static final String PLATFORM_WEIMI = "weimi";


    public static final String PLATFORM_ALIYUN = "aliyun";



    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "SNOWFLAKE")
    @DBColumn(type = MySqlTypeConstant.BIGINT,length = 20,isKey = true)
    private Long id;


    /**
     * 短信平台AppId或者用户名
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String appId;

    /**
     * 短信平台AppSecret或者密码
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String appSecret;

    /**
     * 顶级组织ID
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 4)
    private Integer topOrgId;


    /**
     * 是否禁用
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 2)
    private Integer disabled;


    /**
     * 短信平台
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 16)
    private String platform;


    /**
     * 创建者
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 10)
    private Integer createUser;


    /**
     * 更新者
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 10)
    private Integer updateUser;



    /**
     * 创建时间
     */
    @DBColumn(type = MySqlTypeConstant.DATETIME)
    private Date createTime;


    /**
     * 更新时间
     */
    @DBColumn(type = MySqlTypeConstant.DATETIME)
    private Date updateTime;
    @DBColumn(type = MySqlTypeConstant.INT,length = 10)
    private Integer maxCount;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getTopOrgId() {
        return topOrgId;
    }

    public void setTopOrgId(Integer topOrgId) {
        this.topOrgId = topOrgId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    public Integer getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Integer updateUser) {
        this.updateUser = updateUser;
    }

    public Integer getDisabled() {
        return disabled;
    }

    public void setDisabled(Integer disabled) {
        this.disabled = disabled;
    }

    public Integer getMaxCount() {
        return maxCount;
    }

    public void setMaxCount(Integer maxCount) {
        this.maxCount = maxCount;
    }
}
